<#import "../tpl/pageTep.ftl" as page>
<@page.pageBase currentMenu="佣金管理">
<style>
    .form-horizontal .controls { line-height: 40px;height:40px;}
    .span16 { width: 880px;}
    .form-horizontal .time-label {width: 60px;  }
    .query-button { margin-left: 10px;}
    .form-panel .time-input{width: 120px;}
    .form-panel select {margin-left: 10px;}
</style>

        <#--<div class="panel">-->
            <#--<div class="panel-header">-->
                <#--<a href="${basepath}/manage/organize/toAut">返回上一级</a>-->
            <#--</div>-->
        <#--</div>-->

    <form id="searchForm" class="form-panel">

    <ul class="panel-content">
        <li>
            <div class="control-group span5">
                <div class="search-controls  controls">
                    <input type="text" name="title" id="title" value="" placeholder="搜索关键字">
                </div>
            </div>
            <div class="form-actions span2">
                <button type="submit" class="button  button-primary">
                    搜索
                </button>
            </div>
        </li>
        <li>
            <div class="span16">
                <label class="time-label control-label">审核日期：</label>

                <div class="controls">
                    <input name="start" class="time-input input-small calendar" type="text"><label>&nbsp;-&nbsp;</label><input
                        name="end" class="time-input input-small calendar" type="text">
                </div>
                <label class="time-label control-label">审核人：</label>
                <div class="controls">
                    <input type="text" value="" class="time-input input-normal"/>
                </div>
                <select name="status" class="input-normal" id="status">
                    <option value="">状态</option>
                    <option value="init">通过</option>
                    <option value="pass">不通过</option>
                </select>

                <a class="query-button button button-primary">
                    查询
                </a>
            </div>
        </li>
    </ul>
</form>
<div id="grid"></div>
<script>
    /*-------------------------------------------------------- 表格数据渲染start-----------------------------------*/
    var Grid = BUI.Grid,
            Store = BUI.Data.Store,
            columns = [
                {title: '审核日期', dataIndex: ''},
                {title: '机构名称', dataIndex: '', width: '200'},
                {title: '收款人', dataIndex: ''},
                {title: '收款账号', dataIndex: '', width: '250'},
                {title: '帐号类型', dataIndex: ''},
                {title: '申请人', dataIndex: ''},
                {title: '提现金额', dataIndex: ''},
                {title: '审核人', dataIndex: ''},
                {title: '状态', dataIndex: ''}
            ];
    var store = new Store({
                url: 'loadData',
                autoLoad: true, //自动加载数据
                params: { //配置初始请求的参数
                    length: '10',
                    status: $("#phone").val()
                },
                pageSize: 10,	// 配置分页数目
                root: 'list',
                totalProperty: 'total'
            }),
            grid = new Grid.Grid({
                render: '#grid',
                columns: columns,
                loadMask: true, //加载数据时显示屏蔽层
                store: store,
                plugins: [Grid.Plugins.CheckSelection], // 插件形式引入多选表格

                // 底部工具栏
                bbar: {
                    pagingBar: true
                }
            });
    grid.render();

    var form = new BUI.Form.HForm({
        srcNode: '#searchForm'
    }).render();

    form.on('beforesubmit', function (ev) {
        //序列化成对象
        var obj = form.serializeToObject();
        obj.start = 0; //返回第一页
        store.load(obj);
        return false;
    });
    /*-------------------------------------------------------- 表格数据渲染end-----------------------------------*/

</script>
</@page.pageBase>